// 设置常量保存名字
const TOKENNAME = 'headTiao-token'
// 保存令牌
const saveToken = tokenObj => {
  localStorage.setItem(TOKENNAME, JSON.stringify(tokenObj))
}
// 删除令牌
const removeToken = () => {
  localStorage.removeItem(TOKENNAME)
}
// 取出令牌
const getToken = () => {
  return JSON.parse(localStorage.getItem(TOKENNAME))
}
// 暴露出去
export { saveToken, removeToken, getToken }
